/**
 * @file     coin.h
 * @author   Han Yaoting
 * @date     Sun Dec 24 2023
 * 
 * @brief    Homework4 of D.S.A. Test of project to find out the minimum number of coins that make the total amount of n cents
 * 
 */

#include <iostream>
#include <chrono>
#include "coin.h"

/**  
 * @brief  Used to test the functions provided in Coin.h.
 * 
 */  
int main(){
vector<COIN> coins = {{1, 0}, {5, 0}, {10, 0}, {25, 0}};   
  
    int charges;   
    cin >> charges;  
  
    for (COIN& coin: coins) {  
        cin >> coin.Count;  
    }  

    auto start = chrono::high_resolution_clock::now();  /**<Start the timer*/
      
    int min_coins = Min_coins(charges, coins);  

    auto end = chrono::high_resolution_clock::now();  /**<End the timer*/
      
    chrono::duration<double> duration = end - start;  /**<Calculate the program run time */
      
    if(min_coins>0)
    cout << "最小硬币数：" << min_coins << endl;  
    else
    cout << "无解"<<endl;
    
    cout << "程序运行时间：" << duration.count() << " 秒" << std::endl;

    return 0;
}
